import copy
from ..data_models.api_models import RPInterfaceModelForGet as RP_Get
from ..data_models.api_models import RPInterfaceModelForDELETE as RP_Delete
from ..data_models.base_models import RPBaseModelForAddress as RP_Address

test = {
    'type': 'object',
    'properties': {
        'a': {
            'type': ["string", 'null']
        },
        'b': {
            'type': ["integer", 'null']
        },
        'c': {
            'type': "boolean"
        }
    },
}

web_user_login = {
    'type': 'object',
    'properties': {
        'username': {
            'type': 'string',
        },
        'password': {
            'type': 'string'
        }
    },
    'required': ['username', 'password']
}

get_order_list = {
    'type': 'object',
    'properties': {
        'pay_status': {
            "type": "string",
            "enum": ["paid", "unpaid", "all"]
        },
        'page': {
            'type': 'integer',
        },
        'limit': {
            'type': 'integer',
        }
    },
    "required": ["pay_status"]
}

get_postal_code_by_country = {
    'type': 'object',
    'properties': {
        'country_id': {
            "type": ["integer", 'null']
        },
        'country_code': {
            'type': "string"
        },
        'search_name': {
            'type': "string"
        },
        'page': {
            'type': 'integer',
        },
        'limit': {
            'type': 'integer',
        }
    },
    "required": ["country_id", 'country_code', 'search_name']
}

get_address_list = copy.deepcopy(RP_Get.schema_json)

create_address = copy.deepcopy(RP_Address.schema_json)
create_address['properties'].pop('id')

update_address = copy.deepcopy(RP_Address.schema_json)
update_address['required'] = ["id"]

unlink_address = copy.deepcopy(RP_Delete.schema_json)

get_test = {
    'type': 'object',
    'properties': {
        'a': {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        'b': {
            'type': 'boolean',
        },
        'c': {
            'type': ['number', 'null']
        }
    },
    "required": ["a", "b", "c"]
}
